import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np

x=np.arange(0,100)
y=np.arange(0,1000,10)+np.random.randn(100)*100
z=np.random.randint(0,2,100)
h=np.random.randint(0,2,100)
df=pd.DataFrame(np.c_[x,y,z,h],columns=['a','b','c','d'])
print(df.head())
# row：纵向变为多行
#col：横向变为多行
sns.lmplot(x='a',y='b',data=df,row='c',col='d')
plt.show()
